﻿using Microsoft.SharePoint;

namespace DE.Sdc.SharePoint.Common.Deployment
{
    internal static class DeploymentHelper
    {
        /// <summary>
        /// Gets the web in a parent web or site
        /// </summary>
        /// <param name="parent">The parent web or site</param>
        /// <returns>The </returns>
        internal static SPWeb GetWeb(object parent)
        {
            if (parent is SPSite)
                return ((SPSite)parent).RootWeb;

            return (SPWeb)parent;
        }

    }
}
